From 3961acfb68d116e134f7697f27c162899be6d794 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Wed, 8 Mar 2006 14:04:53 +0000 Subject: [PATCH] make sure that the text_area_width is always >= 0. Fixes bug #316712 (Dan 2006-03-08 Michael Natterer * gtk/gtkentry.c (gtk_entry_adjust_scroll): make sure that the text_area_width is always >= 0. Fixes bug #316712 (Dan Winship). --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ gtk/gtkentry.c | 2 ++ 3 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0c69b4e174..ef7c5e731b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-03-08 Michael Natterer + + * gtk/gtkentry.c (gtk_entry_adjust_scroll): make sure that the + text_area_width is always >= 0. Fixes bug #316712 (Dan Winship). + 2006-03-07 Federico Mena Quintero Cancel drags when the grabs get broken. Fixes bug #333056: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 0c69b4e174..ef7c5e731b 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2006-03-08 Michael Natterer + + * gtk/gtkentry.c (gtk_entry_adjust_scroll): make sure that the + text_area_width is always >= 0. Fixes bug #316712 (Dan Winship). + 2006-03-07 Federico Mena Quintero Cancel drags when the grabs get broken. Fixes bug #333056: diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index cbe9ef9369..dfdb9e9a8d 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -3463,6 +3463,8 @@ gtk_entry_adjust_scroll (GtkEntry *entry) gdk_drawable_get_size (entry->text_area, &text_area_width, NULL); text_area_width -= 2 * INNER_BORDER; + if (text_area_width < 0) + text_area_width = 0; layout = gtk_entry_ensure_layout (entry, TRUE); line = pango_layout_get_lines (layout)->data; -- 2.30.2